<!-- saved from url=(0022)http://internet.e-mail -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>IF Statement</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body class="text">
<p class="heading">Structured Control - IF <br>
<hr noshade>
<p><b>IF</b> - Executes the enclosed code if the
&lt;expression&gt; is true.</p>
<p>The IF statement has the following syntax:</p>
<p class="sourcecode">IF[.<i>size</i>] <i>expression</i> THEN[.<i>extent</i>]<br>&nbsp;&nbsp;
<i>code</i><br> ENDI</p>
<p>or</p>
<p><b>ELSE</b> - Executes the enclosed code if the <i>expression</i> 
is false.</p>
<p class="sourcecode">IF[.<i>size</i>] <i>expression</i> THEN[.<i>extent</i>]<br>
&nbsp;&nbsp; <i>code</i> <br>
ELSE[.<i>extent</i>]<br>
&nbsp;&nbsp; <i>code</i><br>
ENDI</p>
<p><i><b>size</b></i> - The value B, W, or L, specifying the size
of the operand comparison.&nbsp; These values correspond to the Byte, Word, or
Long word data size. <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A size may not be specified when the expression consists of only a condition 
code.</p>
<p><b><i>expression</i></b> - The expression tested.&nbsp; For a
description of the expression syntax, see the <a href="exsyntax.htm"> Expression Syntax</a>
page.</p>
<p><b><i>extent</i></b> - Optional value S or L, indicating the size of 
the forward branch to use (short or long).</p>
<p><b><i>code</i> </b>- The series of assembly commands executed.</p>
<p>One space should be used to separate each part of the statement.</p>
<p><b>EXAMPLE</b></p>
<p class="sourcecode">IF.B D0 &lt;LT&gt; #5 THEN.S<br>
&nbsp;&nbsp; <i>code</i><br>
ENDI </p>
</body>
</html>